package com.itheima.Zixi4.ZuoYe.ZuoYe2;

import javax.management.MBeanAttributeInfo;
import java.util.Map;
import java.util.TreeMap;
import java.util.stream.Collectors;

public class Zuoye2 {
    public static void main(String[] args) {
        Map<Integer,String> map  = new TreeMap<>();
        map.put(23,"张三");
        map.put(56,"张三");
        map.put(11,"张三");
        map.put(4,"张三");
        map.put(99,"张三");
        map.forEach((k,v)-> System.out.println(k+"--"+v));
        Map map1 =map.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey,Map.Entry::getValue));
        map1.forEach((k,v)-> System.out.println(k+"--"+v));
        System.out.println(map1.getClass());
    }

}
